package com.zxy.supplier_system.server.entity

import jakarta.persistence.Entity
import jakarta.persistence.Id
import jakarta.persistence.IdClass
import jakarta.persistence.JoinColumn
import jakarta.persistence.ManyToOne
import jakarta.persistence.Table

@Entity
@Table
@IdClass(BusinessGeneralGoodsCategory.UnionId::class)
class BusinessGeneralGoodsCategory {

    class UnionId{
        var systemService: String? = null
        var category: String? = null
    }


    @Id
    @ManyToOne
    @JoinColumn(nullable = false)
    lateinit var systemService: SystemService

    @Id
    @ManyToOne
    @JoinColumn(nullable = false)
    lateinit var category: GeneralGoodsCategory

}